home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00235_Tip register rollover, etc.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  1.6 KB  |  83 lines

  1. property pSpr, pTimer
  2.  
  3. on beginSprite me
  4.   pSpr = sprite(me.spriteNum)
  5.   pSpr.locZ = 99
  6. end
  7.  
  8. on endSprite me
  9.   pSpr.locZ = me.spriteNum
  10. end
  11.  
  12. on mouseEnter me
  13.   global gCurrentItem
  14.   if draggingIngredient() then
  15.     exit
  16.   end if
  17.   pTimer = nowTicks()
  18.   itemCode = #tipregister
  19.   gCurrentItem = itemCode
  20.   if not draggingIngredient() then
  21.     refreshHelpWindow(itemCode)
  22.   end if
  23.   showDrinkContents(#tipregister, VOID, VOID)
  24. end
  25.  
  26. on mouseLeave me
  27.   if not draggingIngredient() then
  28.     hideToolTip()
  29.   end if
  30. end
  31.  
  32. on customToolTip me, tipType
  33.   global gPlayerTipsThisLevel, gToolTip
  34.   if inBonusMode() then
  35.     tipType = #Current
  36.   else
  37.     if inRecipeMode() then
  38.       tipType = #earned
  39.     end if
  40.   end if
  41.   laserLoc = point(320, 450)
  42.   case tipType of
  43.     #min:
  44.       tipText = "Min Tips:" & RETURN & "$" && currentLevel(#MINTIPS)
  45.     #max:
  46.       tipText = "Max Tips:" & RETURN & "$" && currentLevel(#MAXEARLYTIPS)
  47.     #Current:
  48.       tipText = "Shift Tips:" & RETURN & "$" && string(gPlayerTipsThisLevel)
  49.     #earned:
  50.       tipText = "Practice:" & RETURN & "$" && string(gPlayerTipsThisLevel)
  51.   end case
  52.   sendSprite(gToolTip, #mShowToolTip, pSpr, tipText, laserLoc)
  53. end
  54.  
  55. on mouseWithin me
  56.   if the mouseDown then
  57.     exit
  58.   end if
  59.   if draggingIngredient() then
  60.   else
  61.     if tipTickRange(pTimer) then
  62.       customToolTip(me, #min)
  63.     else
  64.     end if
  65.   end if
  66. end
  67.  
  68. on mouseDown me
  69.   if draggingAnything() then
  70.     replaceDraggingAnything()
  71.     exit
  72.   end if
  73.   if the shiftDown or the optionDown then
  74.     customToolTip(me, #Current)
  75.   else
  76.     if commandOrControlDown() then
  77.       customToolTip(me, #max)
  78.     else
  79.       customToolTip(me, #min)
  80.     end if
  81.   end if
  82. end
  83.